import { Keyring } from "@polkadot/api";

function formatAccountId(accountId32, ss58Format) {
  let keyring = new Keyring({ type: "sr25519", ss58Format });
  const pair = keyring.addFromAddress(accountId32);
  return pair.address;
}
window.Keyring = Keyring;
window.formatAccountId = formatAccountId;
